package lrg10002.exostention.element;

import net.minecraft.item.ItemStack;

public enum ElementType {
	
	INFIDIUM(0, "Infidium"),
	EMPTY(9001, "REPORT PROBLEM TO MODDER!");
	
	private ElementType(int id, String name) {
		this.id = id; this.name = name;
		this.backName = name.replaceAll("\\s", "_").toLowerCase(); //remove whitespaces, convert to lowercase
	}
	
	private int id; public int getId() { return id;}
	private String name; public String getName() {return name;}
	private String backName; public String getBackName() {return backName;}
	public ItemStack getItemStack() { return new ItemStack(7251, 1, id); }
	
	public static ElementType[] ELEMENT_TYPES = new ElementType[]{INFIDIUM};
	
	public static boolean areElementsEqual(ItemStack a, ItemStack b) {
		int aid = a.itemID; int bid = b.itemID;
		int ada = a.getItemDamage(); int bda = b.getItemDamage();
		return aid == bid && ada == bda;
	}

}
